#pragma once
#include "BoundingBox.h"

/**
	* Class for Line Segment
	*
	* Creates the line segment
	* Handles collision detection for line - box only
*/
class BoundingLine{
private:
	Vector3D startPos, endPos;
	float r, g, b;
public:
	BoundingLine(void);
	~BoundingLine(void);

	/**
		* Function to initialize the line segment
		*
		* @param Start position of the line. Vector3D
		* @param End position of the line. Vector3D
	*/
	void InitLine(Vector3D startPos, Vector3D endPos);

	/**
		* Function to change the color of the line. Debugging purpose
		*
		* @param Red color density
		* @param Green color density
		* @param Blue color density
	*/
	void SetColor(float r, float g, float b);

	/**
		* Function to draw the line segment. Debugging purpose
	*/
	void DrawLine(void);

	/**
		* Function to get the start position of the line.
	*/
	Vector3D GetStartPosition(void);
	
	/**
		* Function to get the end position of the line.
	*/
	Vector3D GetEndPosition(void);

	/**
		* Function to test for line to box collision
		*
		* @param Pass in a box for collision checking
		* @return True if collided else false
	*/
	bool HitTest(BoundingBox &box);
};